#include<bits/stdc++.h>
#define y1 Y1
#define fi first
#define endl "\n"
#define se second
#define PI acos(-1)
#define int long long
#define pb(x) push_back(x)
#define PII pair<int, int>
#define Yes cout << "Yes\n";
#define No cout << "No\n";
#define YES cout << "YES\n";
#define NO cout << "NO\n";
#define _for(i, a, b) for(int i = a; i <= b; ++i)
#define IOS ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
using namespace std;

const int N = 2e6 + 10;
const int mod = 1e9 + 7;

int a[N], b[N];
int n, m, t, ret;
string s;
bool flag = false;
int ma = 0, mi = 0x3f3f3f;

signed main() {
	IOS;
	cin >> n >> m;
	for(int i = 1; i <= n; ++ i ) {
		cin >> a[i];
		ma = max(ma, a[i]);
		mi = min(mi, a[i]);
	}
	if(ma + 1 <= m) {
		flag = true;
	}
	if(mi - 1 >= 1) {
		flag = true;
	}
	
	
	cout << (flag == false ? "No" : "Yes") << endl;
	return 0;
}
/*
5 5
2 3 1 4 4
1 2
*/

